package com.ruoyi.agentAdd.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.agentAdd.mapper.SysAgentAddMapper;
import com.ruoyi.agentAdd.domain.SysAgentAdd;
import com.ruoyi.agentAdd.service.ISysAgentAddService;

/**
 * 代理商充值订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-21
 */
@Service
public class SysAgentAddServiceImpl implements ISysAgentAddService 
{
    @Autowired
    private SysAgentAddMapper sysAgentAddMapper;

    /**
     * 查询代理商充值订单
     * 
     * @param id 代理商充值订单主键
     * @return 代理商充值订单
     */
    @Override
    public SysAgentAdd selectSysAgentAddById(Long id)
    {
        return sysAgentAddMapper.selectSysAgentAddById(id);
    }

    /**
     * 查询代理商充值订单列表
     * 
     * @param sysAgentAdd 代理商充值订单
     * @return 代理商充值订单
     */
    @Override
    public List<SysAgentAdd> selectSysAgentAddList(SysAgentAdd sysAgentAdd)
    {
        return sysAgentAddMapper.selectSysAgentAddList(sysAgentAdd);
    }

    /**
     * 新增代理商充值订单
     * 
     * @param sysAgentAdd 代理商充值订单
     * @return 结果
     */
    @Override
    public int insertSysAgentAdd(SysAgentAdd sysAgentAdd)
    {
        sysAgentAdd.setCreateTime(DateUtils.getNowDate());
        return sysAgentAddMapper.insertSysAgentAdd(sysAgentAdd);
    }

    /**
     * 修改代理商充值订单
     * 
     * @param sysAgentAdd 代理商充值订单
     * @return 结果
     */
    @Override
    public int updateSysAgentAdd(SysAgentAdd sysAgentAdd)
    {
        sysAgentAdd.setUpdateTime(DateUtils.getNowDate());
        return sysAgentAddMapper.updateSysAgentAdd(sysAgentAdd);
    }

    /**
     * 批量删除代理商充值订单
     * 
     * @param ids 需要删除的代理商充值订单主键
     * @return 结果
     */
    @Override
    public int deleteSysAgentAddByIds(Long[] ids)
    {
        return sysAgentAddMapper.deleteSysAgentAddByIds(ids);
    }

    /**
     * 删除代理商充值订单信息
     * 
     * @param id 代理商充值订单主键
     * @return 结果
     */
    @Override
    public int deleteSysAgentAddById(Long id)
    {
        return sysAgentAddMapper.deleteSysAgentAddById(id);
    }
}
